/*
----------------------------------------------------------------------------------------------------
This source file is part of the Gamut Framework
Copyright (c) 2007 by Ryan Holcombe

This program is free software; you can redistribute it and/or modify it under the terms of the GNU
Lesser General Public License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
----------------------------------------------------------------------------------------------------
*/


#ifndef _ILogListener_h_
#define _ILogListener_h_

#include <string>

enum LogLevel { EXCEPTION = 1, WARNING, NORMAL, INFORMATIONAL };


namespace Gamut
{

	/**
 		Interface log listener class, all listeners must be inherited from this class before being
		added to the Logger
	*/

	class ILogListener
	{
	private:

	public:
		/**
			\brief initialises the object when it is added to the Logger
		*/
		virtual void onListenerAdd() { }
	
	
		/**
			\brief cleans up the object on shutdown
		*/
		virtual void onListenerDestroy() { }
	
	
		/**
			\brief called whenever logger needs to write an entry
			\param[in] msg log text
			\param[in] file src file this entry was generated from
			\param[in] line line in src
			\param[in] time when the message was generated (min:sec)
			\param[in] level string value of the log level
		*/
		virtual void writeEntry(const std::string& msg, const std::string& file, int line, const std::string& time,
								const std::string& level) = 0;
	};
	
}


#endif
